{extend name='public/base' /}

{block name="content"}
<style type="text/css">
    html {
        background-color: #fff !important;
    }
    .center{
        text-align: center!important;
    }
</style>
<div class="layui-col-md12">
    {if isset($cost)}
    <div class="center" style="font-size: 20px">已缴费列表</div>
    <div class="" id="my-table">
        <table class="layui-table">
            <thead>
            <tr>
                <td>商户名</td>
                <td>表号</td>
                <td>实际用量</td>
                <td>类型</td>
                <td>缴费类型</td>
                <td>水/电费</td>
                <td>服务费</td>
                <td>合计(元)</td>
            </tr>
            </thead>
            <tbody class="role_list">
            {foreach $cost as $key=>$id}
            {if $id['pay_status']==1}
            <tr>
                <td>{$id['merchant']['name']}</td>
                <td>{$id['pointId']}</td>
                <td>{$id.use_number}</td>
                <td>
                    {if $id['type']==4}
                    电费
                    {else}
                    水费
                    {/if}
                </td>
                <td>
                    {if $id['electrity_type']==1}
                    费率用电
                    {else}
                        {if($id['type']==4&& $id['electrity_type']==2)}
                            单一用电
                        {else}
                            单一用水
                        {/if}
                    {/if}
                </td>
                <td>{$id.electric_money/100}</td>
                <td>{$id.fuwu_money/100}</td>
                <td>{$id.amount/100}</td>
            </tr>
            {/if}
            {/foreach}
            </tbody>

        </table>
    </div>
    {/if}
    {if isset($cost)}
    <div class="center" style="font-size: 20px">未交费列表</div>
    <div class="">
        <table class="layui-table">
            <thead>
            <tr>
                <td>商户编号</td>
                <td>商户名</td>
                <td>实际用量</td>
                <td>类型</td>
                <td>缴费类型</td>
                <td>费用</td>
                <td>税费(元)</td>
                <td>合计(元)</td>
            </tr>
            </thead>
            <tbody class="role_list">
            {foreach $cost as $key=>$id}
            {if $id['pay_status']==0}
            <tr>
                <td>{$id['merchant']['merchant_sn']}</td>
                <td>{$id['merchant']['name']}</td>
                <td>{$id.use_number}</td>
                <td>
                    {if $id['type']==4}
                    电费
                    {else}
                    水费
                    {/if}
                </td>
                <td>
                    {if $id['electrity_type']==1}
                    费率用电
                    {else}
                    {if($id['type']==4&& $id['electrity_type']==2)}
                    单一用电
                    {else}
                    单一用水
                    {/if}
                    {/if}
                </td>
                <td>{$id.real_amount/100}</td>
                <td>{$id.service_charge/100}</td>
                <td>{$id.amount/100}</td>
            </tr>
            {/if}
            {/foreach}
            </tbody>

        </table>
    </div>
    {/if}
</div>
{/block}

{block name="js"} <!--js处理区-->
{/block}
